//
//  NYFindPwdViewController.m
//  NYTYY
//
//  Created by MinLison on 2017/12/12.
//  Copyright © 2017年 NYtyy. All rights reserved.
//

#import "NYFindPwdViewController.h"
#import "NYSetPwdViewController.h"
@interface NYFindPwdViewController ()

@end
@implementation NYFindPwdViewController
- (void)configNavigationBar:(BaseNavigationBar *)navigationBar
{
        [super configNavigationBar:navigationBar];
        self.title = @"找回密码";
}
- (void)resetPassword
{
        [NYUserManager findPwd:nil success:^(NYUserModel * _Nonnull user) {
                [NYTipClass showText:@"重置密码成功，请重新登录" inView:self.view].willHideBlock = ^(UIView *hideInView, BOOL animated) {
                        [self.navigationController popToRootViewControllerAnimated:YES];
                };
        } failed:^(NSError * _Nonnull error) {
                [NYTipClass showText:error.localizedDescription inView:self.view];
        }];
}
- (void)getSmsCode
{
        @weakify(self);
        [NYUserManager getSMSWithParam:@{
                                         kRequestKeyIsExist : @(2)
                                         } success:^(NSString * _Nonnull sms) {
                @strongify(self);
                [NYTipClass showText:sms inView:self.view];
        } failed:^(NSError * _Nonnull error) {
                @strongify(self);
                [NYTipClass showText:error.localizedDescription inView:self.view];
        }];
}

@end
